		<table border="1" cellspacing="1" cellpadding="1">
		<tr><td colspan=99><a href="/?exp=<? echo $exp;?>&pag=<?php echo $pag>1?$pag-1:1;?>&ord=<?php echo $ord;?>&sen=<?php echo $sen;?>">Previous page</a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="/?exp=<?php echo $exp;?>&pag=<?php echo $pag+1;?>&ord=<?php echo $ord;?>&sen=<?php echo $sen;?>">Next page</a></td></tr>
		<tr>
		<?php 
		    foreach ($RESULTINFO as $key => $val)
		    {
		        if (($key+1) == $ord && $sen==1)
		            $xSen = 2;
		        else
		            $xSen = 1;
		        echo "<th><a href='/?exp=$exp&pag=1&ord=".($key+1)."&sen=$xSen'>".$val["name"]."</a></th>";
		    }
		?>
		</tr>
		<tr>
		<?php 
		    foreach ($RESULT as $key => $val)
		    {
                echo "<tr>";
		        foreach ($val as $key2=> $val2)
		        {
                    // Example for record edition, goes to example4
		            if ($exp==2 && $key2=="ID")
                        echo "<td><a href='/?exp=4&ID=$val2'>$val2</a></td>";
                    else
		                echo "<td>".$val2."</td>";
		        }
		        echo "</tr>";
		    }
		?>
		</tr>
		</table>